/**
 * 
 */
package org.mspring.crm.client.remote;

import java.util.List;

import org.mspring.crm.client.model.ItemModel;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.google.gwt.user.client.rpc.ServiceDefTarget;

/**
 * @author Gao Youbo
 * @since 2012-3-5
 * 
 */
@RemoteServiceRelativePath("remote/itemRemote")
public interface ItemRemote extends RemoteService {
    public static class Util {
        private static ItemRemoteAsync instance;

        public static ItemRemoteAsync getInstance() {
            if (instance == null) {
                instance = (ItemRemoteAsync) GWT.create(ItemRemote.class);
                ServiceDefTarget target = (ServiceDefTarget) instance;
                target.setServiceEntryPoint("/remote/" + "itemRemote");
            }
            return instance;
        }
    }
    
    
    public List<ItemModel> generateTreeItem(Integer userId, Integer parentId);
    
    public List<ItemModel> findTabItem(Integer parentId);
    
    public List<ItemModel> findPanelItem(Integer parentId);
}
